/**
 * This file is part of mycollab-scheduler.
 *
 * mycollab-scheduler is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * mycollab-scheduler is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with mycollab-scheduler.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.esofthead.mycollab.schedule.email.format

import com.esofthead.mycollab.schedule.email.MailContext

import scala.beans.BeanProperty

/**
 * @author MyCollab Ltd.
 * @since 4.6.0
 */
abstract class FieldFormat(@BeanProperty var fieldName: String, @BeanProperty var displayName: Enum[_], @BeanProperty
var isColSpan: Boolean) {
  def this(fieldName: String, displayName: Enum[_]) = this(fieldName, displayName, false)

  def formatField(context: MailContext[_]): String

  def formatField(context: MailContext[_], value: String): String

  object Type extends Enumeration {
    type Type = Value
    val DEFAULT, DATE, DATE_TIME, CURRENCY = Value
  }
}
